<T:ViewBase x:Class="WPFExcelReport.TCBOOK02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                    Loaded="Window_Loaded"
     >
    <T:ViewBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>  
    </T:ViewBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
        <WrapPanel>
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=CBMANDANT:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwCBOOK.CBMANDANT}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=CBOOKNO:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwCBOOK.CBOOKNO}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=CBSTA:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwCBOOK.CBSTA}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=CBDATE:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwCBOOK.CBDATE}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=CBZOLLST:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwCBOOK.CBZOLLST}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=CBDES1:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwCBOOK.CBDES1}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=CBDES2:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwCBOOK.CBDES2}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=CBVALFRM:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwCBOOK.CBVALFRM}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=CBVALUPT:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwCBOOK.CBVALUPT}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=CBLO:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwCBOOK.CBLO}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=CBLB:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwCBOOK.CBLB}" Width="Auto" />
            </Grid> 
        </WrapPanel>
        <WrapPanel Visibility="{Binding IsCBOOK,Converter={StaticResource ResourceKey=bv}}">
                <ex:TBASE1></ex:TBASE1>
            </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1"  VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"     
                                   ItemsSource="{Binding vwCBOOK}"  
                                    IsSynchronizedWithCurrentItem="True"
                                   SelectedItem="{Binding Path=dwCBOOK, Mode=TwoWay}"
                                   x:Name="dlgVKP"  
                                   RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0.2,0.2,0"
                    >
            <DataGrid.Columns> 
                <DataGridTextColumn x:Name="CBMANDANT"
                                    Binding="{Binding Path=CBMANDANT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBMANDANT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBOOKNO"
                                    Binding="{Binding Path=CBOOKNO, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBOOKNO}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBSTA"
                                    Binding="{Binding Path=CBSTA, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBSTA}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBDATE"
                                    Binding="{Binding Path=CBDATE, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBDATE}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBZOLLST"
                                    Binding="{Binding Path=CBZOLLST, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBZOLLST}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBDES1"
                                    Binding="{Binding Path=CBDES1, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBDES1}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBDES2"
                                    Binding="{Binding Path=CBDES2, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBDES2}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBVALFRM"
                                    Binding="{Binding Path=CBVALFRM, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBVALFRM}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBVALUPT"
                                    Binding="{Binding Path=CBVALUPT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBVALUPT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBLO"
                                    Binding="{Binding Path=CBLO, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBLO}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBLB"
                                    Binding="{Binding Path=CBLB, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBLB}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBBUCHKRS"
                                    Binding="{Binding Path=CBBUCHKRS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBBUCHKRS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBVB"
                                    Binding="{Binding Path=CBVB, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBVB}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBQTY"
                                    Binding="{Binding Path=CBQTY, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBQTY}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBME"
                                    Binding="{Binding Path=CBME, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBME}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBMAXVAL"
                                    Binding="{Binding Path=CBMAXVAL, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBMAXVAL}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBDAYSEXP"
                                    Binding="{Binding Path=CBDAYSEXP, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBDAYSEXP}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBDAYSCP"
                                    Binding="{Binding Path=CBDAYSCP, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBDAYSCP}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBWASTE"
                                    Binding="{Binding Path=CBWASTE, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBWASTE}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBWASTEREA"
                                    Binding="{Binding Path=CBWASTEREA, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBWASTEREA}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBWASTEADD"
                                    Binding="{Binding Path=CBWASTEADD, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBWASTEADD}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBTRBUCH"
                                    Binding="{Binding Path=CBTRBUCH, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBTRBUCH}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBPERLOT"
                                    Binding="{Binding Path=CBPERLOT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBPERLOT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBPERNVE"
                                    Binding="{Binding Path=CBPERNVE, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBPERNVE}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBEXCRATE1"
                                    Binding="{Binding Path=CBEXCRATE1, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBEXCRATE1}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBEXCRATEID"
                                    Binding="{Binding Path=CBEXCRATEID, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBEXCRATEID}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBFILLER"
                                    Binding="{Binding Path=CBFILLER, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBFILLER}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBAENZL"
                                    Binding="{Binding Path=CBAENZL, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBAENZL}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBAENB"
                                    Binding="{Binding Path=CBAENB, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBAENB}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBAEND"
                                    Binding="{Binding Path=CBAEND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBAEND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBNEUB"
                                    Binding="{Binding Path=CBNEUB, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBNEUB}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="CBNEUD"
                                    Binding="{Binding Path=CBNEUD, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=CBNEUD}}"
                                    Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</T:ViewBase> 
 
